package com.example.framework.excel.enums;

/**
 * 枚举，用于业务异常处理
 *
 * @author gx
 * @date 2021/6/11 9:51
 */
public enum BasicCode {
    XLS_XLSX_ERR(10000, "【excel导出】excel类型错误，只支持xls与xlsx！"),
    RESPONSE_ERR(9999, "【excel导出】设置response信息异常！"),
    EXCEL_TURN_HSSFWORKBOOK_ERR(8888, "excel 转换 HSSFWorkbook 异常！"),
    EXCEL_TURN_BEAN_ERR(7777, "excel 转换 HSSFWorkbook 异常！"),
    NOT_EXCEL_FILE(10001, "不是excel文件"),

    IMPORT_TEMPLATE_ERR(10002, "导入模板异常！"),
    FILE_NOT_ERR(10003, "文件不存在！"),
    NAME_ERR(10004, "表头错误！"),
//    TITLE_ERR(10005, ),excel导入】-{}-{} //表头错误
//    COLUMN_ERR(10006, ),【excel导入】-{}-{}列不能为空错误
    BEAN_ERR(10007, "实体空异常"),
    E(10008, "科学计数"),
    EXCEL_EXPORT_ERR(10009, "excel导出异常！"),
    IMPORT_ERR(10012, "excel导入异常！"),

    //MAPPING_ADDRESS_ERR(10010, "【excel导出】class映射地址异常"),
    //TAB_ERR(10011, "【excel导入】{} 页签不能为空！"),
    ;

    BasicCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    private Integer code;
    private String msg;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}